package com.hamny.chat.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class HamnyChatController {

	private static Logger logger = LoggerFactory
			.getLogger(HamnyChatController.class);

	@RequestMapping(value = "get_token", method = RequestMethod.GET)
	@ResponseBody
	public String getToken() {

		return "{\"token\": \"hello\"}";
		// UserService userService = UserServiceFactory.getUserService();
		// User user = userService.getCurrentUser();
		// if(user != null){
		// return user.getEmail();
		// }
		// return null;
	}

	@RequestMapping(value = "", method = RequestMethod.GET)
	@ResponseBody
	public void channel() {
		System.out.println("go here");
	}
}
